package com.client.entity;

import com.client.sm9.gm.sm9.G1KeyPair;
import com.client.sm9.gm.sm9.ResultKeyExchange;
import lombok.Data;
import lombok.Getter;
import lombok.Setter;

import java.util.Date;
import java.util.UUID;

@Data
@Setter
@Getter
public class B_client {
    UUID uid;
    byte[] emsg;    //密文
    byte[] msg;     //消息

    String goal_id;     //目标标识
    int goal_port;      //目标端口号
    String goal_ip;     //目标IP
    int flag;           //认证的阶段：12345 ,-1表示认证失败，-2 认证成功
    int exchang_flag;   //密钥交换:1234, -1:密钥交换失败 , -2成功
    int my_n;           //我的随机数
    int goal_n;         //对方随机数
    Date time;        //时间
    boolean Sponsor;  //是否为密钥交换发起方

    boolean send;   //对方是否收到包 true收到,false未收到（将间隔几秒后重新发包）
    int sendcount;  //重发包的次数


    byte[] goal_R;
    G1KeyPair myKeyPair;
    ResultKeyExchange resultKeyExchange;

    byte[] goal_S;
    byte[] my_S;
    byte[] k;


    public B_client(String goal_id, int goal_port, String goal_ip, int flag, int my_n, int goal_n, Date time,UUID uid) {
        this.goal_id = goal_id;
        this.goal_port = goal_port;
        this.goal_ip = goal_ip;
        this.flag = flag;
        this.my_n = my_n;
        this.goal_n = goal_n;
        this.time = time;
        this.uid = uid;
    }
}
